home *** CD-ROM | disk | FTP | other *** search
/ Item MB Quick & Easy 2.0 / Item MB Quick & Easy 2.0.iso / mbfacad / 0043111.lsp < prev    next >
Text File  |  1998-03-15  |  13KB  |  323 lines

  1. ;=============0.0.431.11 KLEMMPROFIL 30x30
  2.  
  3. (EAITDBL "0043111")
  4. (EAITmsg "mb_mld10" "\n" "002" nil) (princ "........") (princ EAITnrx) (princ "\n")
  5. (princ)
  6.  
  7. (defun C:43111H2 (/ P0 P1 P2 P3 P4 P10 P11 P12 P13 E1 E2 E3 E4 E5 E6
  8.                     Li Lix L2 L2x Wi D30 D3 D10 BName n1 n2 Ben2 Wi2 Px)
  9.    (EAITDBL "0043111")
  10.    (princ (strcat "\n\n" EAITbez1))
  11.    (EAITvari)
  12.    (if (not EAITlpr)(setq EAITlpr 0.0))
  13.    (EAITvars)
  14.    (EAITbpt nil nil nil)
  15.    (setq P1 (getpoint))
  16.    (if (= P1 nil)(setq P1 (EAITrpt)))
  17.    
  18.    (EAITmsg "mb_mld1" "\n" "005" " <")(princ EAITlpr)(princ "> ")  ;Laenge < >
  19.    (initget (+ 2 4))
  20.    (setq Li (getdist " "))
  21.    (if (= Li nil)(setq Li EAITlpr))
  22.    (while (or (> Li EAITlmax)(<= Li EAITlmin))
  23.       (EAITabm_warn)
  24.       (initget (+ 2 4))
  25.       (setq Li (getdist " "))
  26.       (if (= Li nil)(setq Li EAITlpr))
  27.    )
  28.    (setvar "OSMODE" 0)
  29.  
  30.    ;1 Nachkommastelle
  31.    (setq Li (/ (float (fix (+ (* Li 10.0) 0.5))) 10))
  32.    (princ "\n  -> ")(princ Li)
  33.    
  34.    (initget 1)
  35.    (EAITmsg "mb_mld10" "\n" "008" nil)           ;Konstruktionsrichtung
  36.    (setq Wi (getangle P1))
  37.    (setq Wi (* 180.0 (/ Wi Pi)))
  38.    (cond  ((and (>= Wi 90)  (< Wi 180)) (setq Li (* Li -1) D30 30.0 D3 3.4 D10 9.9 Wi 135) )
  39.           ((and (>= Wi 180) (< Wi 270)) (setq D30 -30.0  Li (* Li -1) D3 -26.6 D10 -20.1 Wi 225) )
  40.           ((and (>= Wi 270) (< Wi 360)) (setq D30 -30.0 D3 -26.6 D10 -20.1 Wi 315) )
  41.           (T (setq D30 30.0 D3 3.4 D10 9.9 Wi 45))
  42.    )
  43.    (setq P2 (list (+ (car P1) Li) (cadr P1))
  44.          P3 (list (car P2) (+ (cadr P2) D30))
  45.          P4 (list (car P1) (cadr P3))
  46.    )
  47.    (command EAITlay EAITlse "EAIT50" "")
  48.    (command EAITlin P1 P2 "")
  49.    (setq E1 (entlast))
  50.    (command EAITlin P2 P3 P4 P1 "" )
  51.  
  52.    (setq Px (list (car P1)(+ (cadr P1)(/ D30 2))))
  53.    (EAITmsg "mb_mld10" "\n" "019" nil)(EAITmsg "mb_mld10" " " "024" ":")  ;Lage der Sichtkante (Return = keine):
  54.    (setq Wi2 (getangle Px))
  55.    (if (/= Wi2 nil) (setq Wi2 (* 180.0 (/ Wi2 Pi))) )
  56.    (if (and (>= Wi2 0) (< Wi2 180))
  57.             (setq P10 (list (car P1)(- (cadr P4) D3))
  58.                   P11 (list (car P2)(cadr P10))
  59.                   P12 (list (car P1)(- (cadr P4) D10))
  60.                   P13 (list (car P2)(cadr P12)) )
  61.             (setq P10 (list (car P1)(+ (cadr P1) D3))
  62.                   P11 (list (car P2)(cadr P10))
  63.                   P12 (list (car P1)(+ (cadr P1) D10))
  64.                   P13 (list (car P2)(cadr P12)) )
  65.    )
  66.    (setq BName (EAITbnr))
  67.    (if (/= Wi2 nil)
  68.              (progn
  69.                     (command EAITlin P10 P11 "" EAITlin P12 P13 "")
  70.                     (setq E2 (entnext E1) E3 (entnext E2) E4 (entnext E3) E5 (entnext E4) E6 (entnext E5))
  71.                     (command EAITblo BName P1 E1 E2 E3 E4 E5 E6 "")
  72.              )
  73.              (progn
  74.                     (setq E2 (entnext E1) E3 (entnext E2) E4 (entnext E3))
  75.                     (command EAITblo BName P1 E1 E2 E3 E4 "")
  76.              )
  77.    )
  78.    (command EAITege BName P1 "" "" "")
  79.  
  80.    (setq Li (abs Li))
  81.    (initget (+ 2 4))
  82.    (EAITmsg "mb_mld10" "\n\n" "020" ":  ")           ;Klemmleiste:  <1 => L1 - 5.0> / 2 => L1 - 50.0 / 3 => L / Laenge
  83.    (setq L2 (getreal))
  84.    (cond ((= L2 1)(setq L2 (- Li 5.0)))
  85.          ((= L2 nil)(setq L2 (- Li 5.0)))
  86.          ((= L2 2)(setq L2 (- Li 50.0)))
  87.          ((= L2 3)(setq L2 Li))
  88.    )
  89.    (if (or(< L2 EAITlmin)(> L2 EAITlmax))
  90.        (progn (EAITmsg "mb_mld10" "\n" "021" nil)(EAITmsg "mb_mld13" " " "004" " ")(princ EAITlmin)(EAITmsg "mb_mld13" nil "006" nil)(EAITmsg "mb_mld13" " " "005" " ")
  91.                 (princ EAITlmax)(EAITmsg "mb_mld13" nil "006" nil)  ;Ungültige Laenge:  min. EAITlmin mm  max. EAITlmax mm
  92.            (EAITmsg "mb_mld10" "\n" "022" "\n")        ;   -->  auf 0.0 mm korrigiert
  93.               (setq L2 0.0)
  94.        )
  95.    )
  96.    (setq Li (rtos (abs Li) 2 1) L2 (rtos L2 2 1))
  97.    (command EAITege (strcat EAITpfn "EAITinfo") (polar P1 (EAITgib Wi) 5) "" "" ""
  98.                     EAITbez1 EAITbez2 EAITlie1 EAITlie2 EAITwer1 EAITwer2 Li L2 EAITnr
  99.    )
  100.  
  101.    ;letzte Laenge (Li) merken
  102.    (setq Li (atof Li))
  103.    (setq EAITlpr Li)
  104.    
  105.    (EAITvarz2)
  106.    (princ)
  107. )
  108.  
  109.  
  110. (defun C:43111S2 (/ Px P0 P1 P2 P3 P4 P10 P11 P12 P13 E1 E2 E3 E4 E5 E6 Li Lix
  111.              L2 L2x Wi Wi2 KWi KWix DWx W90 Wix Wi2x BName n1 n2 Ben2 WU WO W2x)
  112.    (EAITDBL "0043111")
  113.    (princ (strcat "\n\n" EAITbez1))
  114.    (EAITvari)
  115.    (if (not EAITlpr)(setq EAITlpr 0.0))
  116.    (EAITvars)
  117.    (EAITbpt nil nil nil)
  118.    (setq P1 (getpoint))
  119.    (if (= P1 nil)(setq P1 (EAITrpt)))
  120.    
  121.    (EAITmsg "mb_mld1" "\n" "005" " <")(princ EAITlpr)(princ "> ")  ;Laenge < >
  122.    (initget (+ 2 4))
  123.    (setq Li (getdist " "))
  124.    (if (= Li nil)(setq Li EAITlpr))
  125.    (while (or (> Li EAITlmax)(<= Li EAITlmin))
  126.       (EAITabm_warn)
  127.       (initget (+ 2 4))
  128.       (setq Li (getdist " "))
  129.       (if (= Li nil)(setq Li EAITlpr))
  130.    )
  131.    (setvar "OSMODE" 0)
  132.  
  133.    ;1 Nachkommastelle
  134.    (setq Li (/ (float (fix (+ (* Li 10.0) 0.5))) 10))
  135.    (princ "\n  -> ")(princ Li)
  136.    
  137.    (initget 1)
  138.    (EAITmsg "mb_mld10" "\n" "004" nil)            ;Winkel
  139.    (setq Wi (getangle P1))
  140.    (setvar "OSMODE" 0)
  141.    (initget 1)
  142.    (EAITmsg "mb_mld10" "\n" "008" nil)           ;Konstruktionsrichtung
  143.    (setq KWi (getangle P1))
  144.  
  145.    (setq Wix (EAITbig Wi) KWix (EAITbig KWi))
  146.    (if (>= Wix KWix) (setq DWx (+ KWix (- 360 Wix))) (setq DWx (- KWix Wix)))
  147.    (cond
  148.       ( (and (>= DWx 0) (< DWx 90))    (setq W90 90.0) )
  149.       ( (and (>= DWx 90) (< DWx 180))  (setq W90 -90.0 Wi (+ Wi (EAITgib 180))) )
  150.       ( (and (>= DWx 180) (< DWx 270)) (setq W90 90.0 Wi (+ Wi (EAITgib 180))) )
  151.       ( T (setq W90 -90.0) )
  152.    )
  153.  
  154.    (setq P2 (polar P1 Wi Li)
  155.          P3 (polar P2 (+ Wi (EAITgib W90)) 30.0)
  156.          P4 (polar P3 (+ Wi (EAITgib 180)) Li)
  157.    )
  158.    (command EAITlay EAITlse "EAIT50" "")
  159.    (command EAITlin P1 P2 "")
  160.    (setq E1 (entlast))
  161.    (command EAITlin P2 P3 P4 P1 "")
  162.  
  163.  
  164.    (setq Px (polar P1 (+ Wi (EAITgib W90)) 15.0))
  165.    (EAITmsg "mb_mld10" "\n" "019" nil)(EAITmsg "mb_mld10" " " "024" ":")  ;Lage der Sichtkante (Return = keine):
  166.    (setq Wi2 (getangle Px))
  167.    (if (/= Wi2 nil)(setq Wi2x (EAITbig Wi2)) )
  168.    (if (and (/= Wi2 nil)(<= Wix 180)) (setq WU Wix WO (+ Wix 180)) (setq WU (- Wix 180) WO Wix))
  169.    (if (and (<= Wi2x WU)(< Wi2 WO)) (setq Wi2x (+ (- 360 WU) Wi2x)))
  170.    (if (and (>= W2x WU)(< Wi2x WO))
  171.            (setq P10 (polar Px (+ (EAITgib WU)(EAITgib 90)) 11.6) P11 (polar P10 Wi Li)
  172.                  P12 (polar Px (+ (EAITgib WU)(EAITgib 90))  5.1) P13 (polar P12 Wi Li))
  173.            (setq P10 (polar Px (+ (EAITgib WU)(EAITgib 90))-11.6) P11 (polar P10 Wi Li)
  174.                  P12 (polar Px (+ (EAITgib WU)(EAITgib 90)) -5.1) P13 (polar P12 Wi Li))
  175.    )
  176.    (setq BName (EAITbnr))
  177.    (if (/= Wi2 nil)
  178.              (progn
  179.                     (command EAITlin P10 P11 "" EAITlin P12 P13 "")
  180.                     (setq E2 (entnext E1) E3 (entnext E2) E4 (entnext E3) E5 (entnext E4) E6 (entnext E5) )
  181.                     (command EAITblo BName P1 E1 E2 E3 E4 E5 E6 "")
  182.              )
  183.              (progn
  184.                     (setq E2 (entnext E1) E3 (entnext E2) E4 (entnext E3))
  185.                     (command EAITblo BName P1 E1 E2 E3 E4 "")
  186.              )
  187.    )
  188.    (command EAITege BName P1 "" "" "")
  189.  
  190.    (setq Li (abs Li))
  191.    (initget (+ 2 4))
  192.    (EAITmsg "mb_mld10" "\n\n" "020" ":  ")           ;Klemmleiste:  <1 => L1 - 5.0> / 2 => L1 - 50.0 / 3 => L / Laenge
  193.    (setq L2 (getreal))
  194.    (cond ((= L2 1)(setq L2 (- Li 5.0)))
  195.          ((= L2 nil)(setq L2 (- Li 5.0)))
  196.          ((= L2 2)(setq L2 (- Li 50.0)))
  197.          ((= L2 3)(setq L2 Li))
  198.    )
  199.    (if (or(< L2 EAITlmin)(> L2 EAITlmax))
  200.        (progn (EAITmsg "mb_mld10" "\n" "021" nil)(EAITmsg "mb_mld13" " " "004" " ")(princ EAITlmin)(EAITmsg "mb_mld13" nil "006" nil)(EAITmsg "mb_mld13" " " "005" " ")
  201.                 (princ EAITlmax)(EAITmsg "mb_mld13" nil "006" nil)  ;Ungültige Laenge:  min. EAITlmin mm  max. EAITlmax mm
  202.            (EAITmsg "mb_mld10" "\n" "022" "\n")        ;   -->  auf 0.0 mm korrigiert
  203.               (setq L2 0.0)
  204.        )
  205.    )
  206.    (setq Li (rtos (abs Li) 2 1) L2 (rtos L2 2 1))
  207.  
  208.    (command EAITege (strcat EAITpfn "EAITinfo") (polar (polar P1 Wi 3.5) (+ Wi (EAITgib W90)) 3.5) "" "" ""
  209.                     EAITbez1 EAITbez2 EAITlie1 EAITlie2 EAITwer1 EAITwer2 Li L2 EAITnr
  210.    )
  211.    
  212.    ;letzte Laenge (Li) merken
  213.    (setq Li (atof Li))
  214.    (setq EAITlpr Li)
  215.    
  216.    (EAITvarz2)
  217.    (princ)
  218. )
  219.  
  220.  
  221. (defun C:43111V2 (/ P0 P1 P2 P3 P4 P10 P11 P12 P13 E1 E2 E3 E4 E5 E6
  222.                     Li Lix L2 L2x Wi D30 D3 D10 BName n1 n2 Ben2 Wi2 Px)
  223.    (EAITDBL "0043111")
  224.    (princ (strcat "\n\n" EAITbez1))
  225.    (EAITvari)
  226.    (if (not EAITlpr)(setq EAITlpr 0.0))
  227.    (EAITvars)
  228.    (EAITbpt nil nil nil)
  229.    (setq P1 (getpoint))
  230.    (if (= P1 nil)(setq P1 (EAITrpt)))
  231.    
  232.    (EAITmsg "mb_mld1" "\n" "005" " <")(princ EAITlpr)(princ "> ")  ;Laenge < >
  233.    (initget (+ 2 4))
  234.    (setq Li (getdist " "))
  235.    (if (= Li nil)(setq Li EAITlpr))
  236.    (while (or (> Li EAITlmax)(<= Li EAITlmin))
  237.       (EAITabm_warn)
  238.       (initget (+ 2 4))
  239.       (setq Li (getdist " "))
  240.       (if (= Li nil)(setq Li EAITlpr))
  241.    )
  242.    (setvar "OSMODE" 0)
  243.  
  244.    ;1 Nachkommastelle
  245.    (setq Li (/ (float (fix (+ (* Li 10.0) 0.5))) 10))
  246.    (princ "\n  -> ")(princ Li)
  247.    
  248.    (initget 1)
  249.    (EAITmsg "mb_mld10" "\n" "008" nil)           ;Konstruktionsrichtung
  250.    (setq Wi (getangle P1))
  251.    (setq Wi (* 180.0 (/ Wi Pi)))
  252.    (cond  ( (and (>= Wi 90)  (< Wi 180)) (setq D30 -30.0 D3 -26.6 D10 -20.1 Wi 135) )
  253.           ( (and (>= Wi 180) (< Wi 270)) (setq D30 -30.0 D3 -26.6 D10 -20.1 Li (* Li -1) Wi 225) )
  254.           ( (and (>= Wi 270) (< Wi 360)) (setq D30  30.0 D3   3.4 D10  9.9 Li (* Li -1) Wi 315) )
  255.           (T                             (setq D30 30.0 D3 3.4 D10 9.9 Wi 45))
  256.    )
  257.    (setq P2 (list (+ (car P1) D30) (cadr P1))
  258.          P3 (list (car P2) (+ (cadr P2) Li))
  259.          P4 (list (car P1) (cadr P3))
  260.    )
  261.    (command EAITlay EAITlse "EAIT50" "")
  262.    (command EAITlin P1 P2 "")
  263.    (setq E1 (entlast))
  264.    (command EAITlin P2 P3 P4 P1 "" )
  265.  
  266.    (setq Px (list (+ (car P1)(/ D30 2)) (cadr P1)))
  267.    (EAITmsg "mb_mld10" "\n" "019" nil)(EAITmsg "mb_mld10" " " "024" ":")  ;Lage der Sichtkante (Return = keine):
  268.    (setq Wi2 (getangle Px))
  269.    (if (/= Wi2 nil) (setq Wi2 (* 180.0 (/ Wi2 Pi))))
  270.    (if (and (>= Wi2 90) (< Wi2 270))
  271.             (setq P10 (list (+ (car P1) D3)(cadr P1))
  272.                   P11 (list (car P10)(cadr P3))
  273.                   P12 (list (+ (car P1) D10)(cadr P1))
  274.                   P13 (list (car P12)(cadr P3)) )
  275.             (setq P10 (list (- (car P2) D3)(cadr P1))
  276.                   P11 (list (car P10)(cadr P3))
  277.                   P12 (list (- (car P2) D10)(cadr P1))
  278.                   P13 (list (car P12)(cadr P3)) )
  279.    )
  280.    (setq BName (EAITbnr))
  281.    (if (/= Wi2 nil)
  282.              (progn
  283.                     (command EAITlin P10 P11 "" EAITlin P12 P13 "")
  284.                     (setq E2 (entnext E1) E3 (entnext E2) E4 (entnext E3) E5 (entnext E4)  E6 (entnext E5) )
  285.                     (command EAITblo BName P1 E1 E2 E3 E4 E5 E6 "")
  286.              )
  287.              (progn
  288.                     (setq E2 (entnext E1) E3 (entnext E2) E4 (entnext E3))
  289.                     (command EAITblo BName P1 E1 E2 E3 E4 "")
  290.              )
  291.    )
  292.    (command EAITege BName P1 "" "" "")
  293.  
  294.    (setq Li (abs Li))
  295.    (initget (+ 2 4))
  296.    (EAITmsg "mb_mld10" "\n\n" "020" ":  ")           ;Klemmleiste:  <1 => L1 - 5.0> / 2 => L1 - 50.0 / 3 => L / Laenge
  297.    (setq L2 (getreal))
  298.    (cond ((= L2 1)(setq L2 (- Li 5.0)))
  299.          ((= L2 nil)(setq L2 (- Li 5.0)))
  300.          ((= L2 2)(setq L2 (- Li 50.0)))
  301.          ((= L2 3)(setq L2 Li))
  302.    )
  303.    (if (or(< L2 EAITlmin)(> L2 EAITlmax))
  304.        (progn (EAITmsg "mb_mld10" "\n" "021" nil)(EAITmsg "mb_mld13" " " "004" " ")(princ EAITlmin)(EAITmsg "mb_mld13" nil "006" nil)(EAITmsg "mb_mld13" " " "005" " ")
  305.                 (princ EAITlmax)(EAITmsg "mb_mld13" nil "006" nil)  ;Ungültige Laenge:  min. EAITlmin mm  max. EAITlmax mm
  306.            (EAITmsg "mb_mld10" "\n" "022" "\n")        ;   -->  auf 0.0 mm korrigiert
  307.               (setq L2 0.0)
  308.        )
  309.    )
  310.    (setq Li (rtos (abs Li) 2 1) L2 (rtos L2 2 1))
  311.    (command EAITege (strcat EAITpfn "EAITinfo") (polar P1 (EAITgib Wi) 5) "" "" ""
  312.                     EAITbez1 EAITbez2 EAITlie1 EAITlie2 EAITwer1 EAITwer2 Li L2 EAITnr
  313.    )
  314.  
  315.    ;letzte Laenge (Li) merken
  316.    (setq Li (atof Li))
  317.    (setq EAITlpr Li)
  318.    
  319.    (EAITvarz2)
  320.    (princ)
  321. )
  322. (princ)
  323.